#include "gamepage.h"
#include "ui_gamepage.h"
#include<QLabel>
#include<QGraphicsPixmapItem>
#include <QVBoxLayout>


gamepage::gamepage(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::gamepage)
{
    ui->setupUi(this);

    this->setFixedSize(720,660);
    scene = new Scene(this);
    ui->Box->setScene(scene);
   connect(scene,&Scene::Gameover,this,&gamepage::over);

}

gamepage::~gamepage()
{
    delete ui;
}

void gamepage::start()
{
scene->start();
}

void gamepage::over(int score){
    emit GameOver(score);
    scene->stop();
}
